package transaction;

import javax.jdo.PersistenceManager;


public class TransactionControlImpl implements TransactionControl {
	
	private PersistenceManager pm;
	
	public TransactionControlImpl() {
	}
	
	public void begin() {
		pm.currentTransaction().begin();
	}

	@Override
	public void close() {
		try {
			pm.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	@Override
	public void commit() {
		pm.currentTransaction().commit();
	}

	@Override
	public void rollback() {
		pm.currentTransaction().rollback();
	}

}
